<!--
 * @Description: 资源管理---运维资源---应用目录
 * @Author: 魏勇
 * @Date: 2020-03-09 15:36:26
 * @LastEditTime: 2020-03-31 18:16:32
 * @LastEditors: 魏勇
 -->
<template>
    <div class="dbBase" style="background-color: #fff;">
        <el-row>
            <span :key="btnItem.id" v-for="(btnItem,index) in btns" style="margin-left: 8px;">
                  <el-button v-if="btnItem.type==='iconBtn'" @click="btnClick(btnItem)" :icon="btnItem.icon"></el-button>
                    <el-button v-else @click="btnClick(btnItem)"
                               :icon="btnItem.icon">
                        {{btnItem.label}}
                    </el-button>

            </span>
            <el-button style="margin-left: 8px;" :key="index" v-for="(btnItem,index) in extendBtns"
                       @click="btnClick(btnItem)"
                       :icon="btnItem.icon">
                {{btnItem.label}}
            </el-button>

        </el-row>

        <!--        表格-->
        <el-row style="padding-top: 8px;">
            <el-table-ctl   :params="queryParams"  :dynamic="true"  :maxHeight="maxHeight" @operationClick="operationClick" :operations="operations" ref="tableObj" :cols="gridCols"></el-table-ctl>
        </el-row>

        <!--        新增窗口-->
        <app-dialog
                :isShowDialog="isShowAddDialog||isShowPurchaseWin"
                :title="winTitle"
                :width="winWidth"
                @confirm="addConfirm"
                @close="closeAddWin">
            <dynamicForm ref="dynamicForm" :items="formCols"></dynamicForm>
        </app-dialog>



        <!--        购买记录-->
        <app-dialog
                :isShowDialog="isShowPurchaseRecordsWin"
                title="购买记录"
                width="70%"
                @confirm="addConfirm"
                @close="isShowPurchaseRecordsWin=false">
            <purchase-records></purchase-records>
        </app-dialog>

    </div>
</template>

<script>
    import crudMixin from '@/mixins/crudMixin.js';
    import devResourceMixin from '../mixn/devResourceMixin';
    import enumData from "../data/enum";
    import AppDialog from "@/components/AppCommon/AppDialog";
    import dynamicForm from "@/views/devOpsResource/components/dynamicForm";
    import elTableCtl from "../components/el-table-ctl";
    import purchaseRecords from "../components/purchaseRecords"



    export default {
        name: "appDir",
        mixins: [crudMixin,devResourceMixin],
        components: {
            AppDialog,
            dynamicForm,
            elTableCtl,
            purchaseRecords,
        },
        computed: {
            queryParams() {
                return {type: enumData.appDir};
            }
        },
        data() {
            return {
                tabType: enumData.appDir,
                extendBtns: [

                ],
                //列集合
                cols: [],
            }
        },
        mounted() {
            this.searchGridByCondition("");
        },
        watch: {},
        methods: {

        }
    };
</script>

